<style type="text/css">
    .tableContent th, .tableContent td{text-align:center;}
</style>

<div class="bjui-pageHeader">
    <div style="padding:10px 0 2px 0;">
        <form id="pagerForm" action="<?=admin_url('menu');?>" method="post" data-toggle="ajaxsearch">
            <input type="hidden" name="pageSize" value="<?=$pageSize;?>">
            <input type="hidden" name="pageCurrent" value="<?=$pageCurrent;?>">
            <input type="hidden" name="orderField" value="<?=$orderField;?>">
            <input type="hidden" name="orderDirection" value="<?=$orderDirection;?>">
            <div class="bjui-searchBar">
                <label style="vertical-align:middle;">选择:</label>&nbsp;
                <select name="keytype" data-toggle="selectpicker">
                    <option value="name" <?php if($keytype=='name'):?>selected<?php endif;?>>模块名称</option>
                    <option value="url" <?php if($keytype=='id'):?>selected<?php endif;?>>模块路径</option>
                </select>&nbsp;
                <input type="text" value="<?=$keyword;?>" name="keyword" class="form-control" size="16">&nbsp;

                <label style="vertical-align:middle;">状态:</label>&nbsp;
                <select name="status" data-toggle="selectpicker">
                    <option value="all">全部</option>
                    <option value="1" <?php if($status == '1'):?>selected<?php endif;?>>启用</option>
                    <option value="0" <?php if($status == '0'):?>selected<?php endif;?> style="color:red;">禁用</option>
                </select>&nbsp;

                <button type="submit" class="btn-blue" data-icon="search" style="margin-left:30px;">查询</button>&nbsp;&nbsp;
                <a class="btn btn-green" href="javascript:;" data-toggle="reloadsearch" data-icon="refresh">刷新</a>

                <div class="pull-right">
                    <button type="button" class="btn-blue" data-url="<?=admin_url('menu/add');?>" data-id="menu-add" data-icon="plus" data-toggle="dialog" data-width="900" data-height="700" data-mask="true" style="margin-right:14px;">添加</button>
                </div>
            </div>
        </form>
    </div>
</div>
<div class="bjui-pageContent tableContent">
    <table class="table table-bordered table-hover table-striped table-top" data-selected-multi="false" data-toggle="tablefixed">
        <thead>
            <tr>
                <th data-order-field="id" data-order-direction="asc">ID</th>
                <th>状态</th>
                <th>模块名称</th>
                <th>上级模块</th>
                <th>模块地址</th>
                <th width="100">操作</th>
            </tr>
        </thead>
        <tbody>
            <?php foreach ($list as $v):?>
            <tr data-id="<?=$v->id;?>">
                <td><?=$v->id;?></td>
                <td <?=Iif($v->status=='0', 'class="red"');?>><?=$status_arr[$v->status];?></td>
                <td><?=$v->name;?></td>
                <td><?=$v->parent;?></td>
                <td><?=$v->url;?></td>
                <td>
                    <a href="<?=admin_url('menu/edit/' . $v->id);?>" class="btn btn-green" data-toggle="dialog" data-id="menu-edit" data-width="900" data-height="700" data-mask="true">编辑</a>
                    <!-- <?php if($v->admin_counts <= 0):?>
                    <a href="<?=admin_url('menu/delete/' . $v->id);?>" class="btn btn-red" data-toggle="doajax" data-confirm-msg="确定要删除该行信息吗？">删</a>
                    <?php endif;?> -->
                </td>
            </tr>
            <?php endforeach;?>
        </tbody>
    </table>
</div>
<div class="bjui-pageFooter">
    <div class="pages">
        <span>每页&nbsp;</span>
        <div class="selectPagesize">
            <select data-toggle="selectpicker" data-toggle-change="changepagesize">
                <option value="10" <?php if($pageSize==10):?>selected<?php endif;?>>10</option>
                <option value="20" <?php if($pageSize==20):?>selected<?php endif;?>>20</option>
                <option value="40" <?php if($pageSize==40):?>selected<?php endif;?>>40</option>
                <option value="80" <?php if($pageSize==80):?>selected<?php endif;?>>80</option>
                <option value="160" <?php if($pageSize==160):?>selected<?php endif;?>>160</option>
            </select>
        </div>
        <span>&nbsp;条，共 <?=$totalCount;?> 条</span>
    </div>
    <div class="pagination-box" data-toggle="pagination" data-total="<?=$totalCount;?>" data-page-size="<?=$pageSize;?>" data-page-current="<?=$pageCurrent;?>">
    </div>
</div>